﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BoAddonBiz_FreightForwarder.SystemForm
{
    public class B1Form_ItemMasterData : SAPBoAddon.B1Form
    {
        public B1Form_ItemMasterData()
        {
            frm_ItemEvent += new SAPBoAddon.IB1FormEvents.B1ItemEventEventHandler(Quote_frm_ItemEvent);
        }

        void Quote_frm_ItemEvent(SAPBoAddon.B1AddonBase.B1ItemEvent pVal, ref bool BubbleEvent)
        {
            if (pVal.BeforeAction)
            {
                if (pVal.EventType == SAPbouiCOM.BoEventTypes.et_FORM_LOAD)
                {
                    SAPbouiCOM.Form oForm;
                    SAPbouiCOM.Folder oFolder;

                    oForm = this.CurrentForm;
                    oForm.Title = "费用项主数据";
                    oFolder = oForm.Items.Item("11").Specific;
                    oFolder.Select();                   
                }
            }          
        }
        /// <summary>
        /// 保存前检查
        /// </summary>
        /// <returns></returns>
        protected override bool BeforeSaveCheckFormData()
        {
            return true;
        }
        /// <summary>
        /// 窗体可编辑状态更改
        /// </summary>
        /// <param name="frmEditMode"></param>
        protected override void FormEditModeChange(SAPBoAddon.frmItemEditMode frmEditMode)
        {

        }
        /// <summary>
        /// 窗体设置
        /// </summary>
        /// <param name="FormSetting"></param>
        protected override void FormInfoSetting(SAPBoAddon.B1FormSetting FormSetting)
        {
            FormSetting.FormType = B1FormTypes.sys_MasterItem;
        }
        /// <summary>
        /// 窗体初始化
        /// </summary>
        /// <param name="InitPar"></param>
        protected override void InitializeForm(SAPBoAddon.B1FormInitializePar InitPar)
        {
        }
    }
}
